package com.example.demo.service;

import com.example.demo.dao.StuDao;
import com.example.demo.entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 13795 on 2017/7/5.
 */
@Service
public class StuService {
    @Autowired
    public StuDao stuDao;
    public List<Student> findAllStudent(){
        List<Student> list=stuDao.findAllStudent();
        return list;
    }

    public void saveStudent(Student student) {
         stuDao.save(student);
    }

    public void deleteStudent(Integer id) {
        stuDao.deleteStudent(id);
    }
}
